Dim MySocket As SocketDevice
Set MySocket = New SocketDevice
MySocket.Name = "MySocket"
Dim theSocketDeviceInfo As SocketDeviceInfo
' can also be a DNS name of x.x.x.x IP address
theSocketDeviceInfo.Server = "127.0.0.1"
theSocketDeviceInfo.Port = 1234
theSocketDeviceInfo.SocketType = ebProtocolTcp
theSocketDeviceInfo.ByteOrdering = ebByteOrderingLittleEndian

'Open
MySocket.Open theSocketDeviceInfo

Dim strData As String

strData = "<TRIGGER>1001</TRIGGER>"

MySocket.WriteString strData

MySocket.FlushInputBuffer
MySocket.FlushOutputBuffer
Sleep 500
MySocket.Close
Set MySocket = Nothing